﻿namespace TomatoBreak.Infrastructure
{
    using System;
    using System.Collections.Generic;
    using System.Web.Mvc;

    public abstract class FilterRegistryItem
    {
        protected FilterRegistryItem(IEnumerable<Func<IMvcFilter>> filters)
        {
            if (filters == null)
            {
                throw new ArgumentNullException("filters");
            }

            Filters = filters;
        }

        public IEnumerable<Func<IMvcFilter>> Filters { get; protected set; }

        public abstract bool IsMatching(ControllerContext controllerContext, ActionDescriptor actionDescriptor);
    }
}